home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 October / MACPOWER-1997-10.ISO.7z / MACPOWER-1997-10.ISO / AMUG / PROGRAMMING / Mac F2C 1.3.5.sit / Mac F2C 1.3.5 / Mac F2C v1.3.5 Documentation.rsrc / TEXT_132.txt < prev    next >
Text File  |  1997-06-15  |  3KB  |  38 lines

  1. Translating FORTRAN With Mac F2C
  2.  
  3.  
  4. You can use Mac F2C to translate FORTRAN to C using four methods:
  5.  
  6. 窶「 Start up Mac F2C and select the Translate command in the File menu.  
  7.     
  8. 窶「 Drag-&-drop a bunch of FORTRAN files onto Mac F2C.
  9.  
  10. 窶「 Use a scripting language (such as AppleScript) to send Mac F2C either an open command, an f2c command, or a translate command.  For more information on the differences between these and for more general information on driving Mac F2C from a script, see the instructions in the chapter 窶彜cripting Mac F2C.窶  Sample AppleScripts for driving Mac F2C are included in the Mac F2C Extras folder.
  11.  
  12. 窶「 If you are using Mac F2C with CodeWarrior, you can also use the CodeWarrior MPW/ToolServer tools to drive integrated Mac F2C - CodeWarrior builds.  The ToolServer READ ME and MPW READ ME files provide detailed instructions for using these tools.
  13.      
  14. FORTRAN files must be TEXT files and must end in .f or .F (sorry, but the ending is determined by the unix f2c kernel窶琶t rejects files handed to it with any other endings).  The output file has the same name with a .c extension if you selected C code for the output, or the same name with a .cp extension if you selected C++ code for the output.
  15.  
  16. The first five items in the Options menu let you control the various translation and code generation options.  If you check the Make these the new defaults box before clicking the OK button, your option selections will be saved in a preference file and used again the next time you start Mac F2C.
  17.  
  18. If you do not understand what an option means, check the balloon help.  The help balloons provide more detailed explanations of what each option means.  They also explain why dimmed options are not available and what you can do to make them available.
  19.  
  20. The last two item in the options menu (Compiler Interactions and Mac F2C Preferences) let you control how Mac F2C operates.  
  21.  
  22. The Compiler Interactions dialog lets you control how Mac F2C interacts with C/C++ compilers.  More specifically, it allows you to specify:
  23.  
  24. 窶「 Which C/C++ compilers Mac F2C will interact with.  Current choices are THINK C/C++, Symantec C/C++, CodeWarrior C/C++ 68K, CodeWarrior C/C++ PPC, and CodeWarrior IDE v1.3 (integrated 68K/PPC environment).
  25.  
  26. 窶「 The level of interaction with those compilers.  This varies from No Interaction all the way to Build Target(s).  If a group of FORTRAN files are translated at once (via a drag-&-drop or via an AppleScript), Compile, Update, and Build commands are not sent until the all files in the group are translated.  All interactions will fail silently if the corresponding C/C++ compiler isn窶冲 running or for any reason cannot complete the compilers or links.
  27.       
  28. The last item in the Options menu (Mac F2C Preferences) lets you control how Mac F2C operates.  This dialog lets you control:
  29.  
  30. 窶「 How Mac F2C behaves after having been launched with a drag-&-drop.
  31.     
  32. 窶「 Whether the Advanced Options dialog will have an edit text field that allows you to enter unix option switches directly.
  33.  
  34. 窶「 Whether to silently skip non-FORTRAN files that are dropped on Mac F2C.
  35.       
  36. 窶「 The creator type for all of the output files (this determines their icon).
  37.     
  38. In all cases, check the balloon help if you do not understand what an option means.